

package com.jingdun.sport.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jingdun.sport.bean.model.Room;
import com.jingdun.sport.bean.model.RoomUserRelation;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;
import java.util.Set;

public interface RoomUserRelationMapper extends BaseMapper<RoomUserRelation> {

    public void addRoomUserRelation(RoomUserRelation roomUserRelation);

    public List<Map<String, Object>> getPaginationRoomUserRelation(Page<Map<String, Object>> page, @Param("params") Map<String, Object> m);

    public List getRankFirstAndRankLastList(@Param("params") Map<String, Object> m);

    public List<Map<String, Object>> getPaginationAllPeopleSport(Page<Map<String, Object>> page, @Param("params") Map<String, Object> m);

    public List getRoomUserRelationAllDoneList(@Param("params") Map<String, Object> m);

    public RoomUserRelation getRoomUserRelationDetail(@Param("params") Map<String, Object> m);

    public void updateRoomUserRelation(RoomUserRelation roomUserRelation);

    List<RoomUserRelation> getAllRoomMapUserByRoomId(@Param("params") Set<Long> ufinishedRoomIdSet);

    List<RoomUserRelation> getPageRoomMapByUserId(@Param("params") Map m);

    void updateAllDoneByUserIdAndRoomId(@Param("params") Map m);

    void updateTakenPriceByUserIdAndRoomId(@Param("params") Map map);

    long getCountRoomMapByUserId(@Param("params") Map m);

    long getByRoomIdAndUserId(@Param("roomId") String roomId, @Param("userId") String userId);
}